package com.ambimmort.shj.action.logmanage;

import com.ambimmort.shj.service.logmanageService.LogmanageService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by ma on 2015/7/30.
 */
@Controller("/action/system/setlistproperty.do")
public class SetListProperty {

    private LogmanageService logmanageService;

    @RequestMapping("/action/system/setlistproperty.do")
    @ResponseBody
    public String action_setListProperty(
            HttpServletRequest request, @RequestParam("property") String property) {
        try {
            logmanageService.setListProperty(property);
            return "{\"result\":\"true\"}";
        } catch (Throwable throwable) {
            throwable.printStackTrace();
            return "{\"result\":\"false\"}";
        }
    }
}
